<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="css/public.css" rel="stylesheet">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/list.css" rel="stylesheet">
    <title>列表页</title>
</head>
<body>


<div class="nav top">
    <ul class="nav navbar-nav navbar-right top-list">
        <li><a href="#">关于我们</a></li>
        <li><a href="regist.jsp">注册</a></li>
        <li><a href="login.jsp">登录</a></li>
    </ul>
</div>

<div class="container main-container">
    <div class="nav-img">
        <img src="img/index-nav.png">
    </div>
    <div class="search">
      <form action="<c:url value='/SeedServlet'/>" method="post">
         <input type="hidden" name="method" value="query"/>
            <div class="form-group">
                <input type="search" class="form-control">
                <button class="btn-default search-btn"></button>
            </div>
        </form>
    </div>

    <nav class="nav nav-main">

        <ul class="nav navbar-nav nav-list">
            <li><a href="index">首页</a></li>
             <li><a href="<c:url value='/AdminSeedServlet?method=addPre1'/>">上传产品</a></li>
           <li><a href="<c:url value='/SeedServlet?method=findAll'/>">产品列页</a></li>
            <li><a href="<c:url value='/CategoryServlet?method=findAll'/>">所有分类</a></li>
            <li><a href="<c:url value='/SeedServlet?method=messageGet'/>">留言板</a></li>
        </ul>
    </nav>
    <!--下列是一个右侧栏，设计的时候也要单独放一个文件中-->
        <div class="col-md-3">
            <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="panel-title">
                        <span class="glyphicon glyphicon-tag">&nbsp;</span>所有种子类
                    </div>
                </div>
                <c:forEach items="${categoryList }" var="category">
                <div class="panel panel-body recommend">
                    <ul>
                        <li><a href="<c:url value='/SeedServlet?method=findByCategory&cid=${category.cid }'/>">${category.cname }</a></li>
                         
                        
                    </ul>
                </div>
               </c:forEach>
            </div>


           
        </div>
    </div>
  </body>
</html>
